import { NameSpace } from 'utils';

const ns = NameSpace('projectMergeRequestDetailOverview');
export const UPDATE_DATA = ns('UPDATE_DATA');

/* eslint-disable */
export function openCodescanPanel(data) {
  return (dispatch) => {
    dispatch({
      type: 'cr_changes-OPEN_CODESCAN_PANEL_FROM_OVERVIEW',
      data: data.isShowCodeScan,
    });
    dispatch({
      type: 'cr_changes-SET_BUILDID',
      data: data.curBuildId,
    });
  };
}

export function openCommentPanel(data) {
  return (dispatch) => {
    dispatch({
      type: 'cr_changes-OPEN_COMMENT_PANEL_FROM_OVERVIEW',
      data: data.isShowComment,
    });
    dispatch({
      type: 'cr_changes-SET_COMMENT_PANNEL_STATUS',
      data: data.curCommentStatus,
    });
  };
}
